﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyCore.Excel
{
    [AttributeUsage(AttributeTargets.Property)]
    public class ExcelColMappingAttribute : Attribute
    {
        public ExcelColMappingAttribute(string columnName, bool required = false, bool isHide = false, int order = 0)
        {           
            ColumnName = columnName;
            Required = required;
            IsHide = isHide;
            Order = order;
        }


        /// <summary>
        /// 字段名称或属性名称
        /// </summary>
        public string FieldName { get; set; }

        /// <summary>
        /// Excel列名称
        /// </summary>
        public string ColumnName { get; set; }

        /// <summary>
        /// 是否必填
        /// </summary>
        public bool Required { get; set; }

        /// <summary>
        /// 是否隐藏
        /// </summary>
        public bool IsHide { get; set; }

        /// <summary>
        /// 排序号【用于导出操作】：数字越小，排序越靠前
        /// </summary>
        public int Order { get; set; }









    }
}
